package com.fjut.pms.service.impl;

import java.util.HashMap;
import java.util.Map;

import com.fjut.pms.dao.IBaseDao;
import com.fjut.pms.pojo.Checking;
import com.fjut.pms.service.ICheckingService;
import com.fjut.pms.utils.PageBean;

public class CheckingServiceImpl implements ICheckingService{

	private IBaseDao checkDao;
	
	public PageBean findCheck(PageBean page, int id) {
		String hql="from Checking check where 1=1 ";
		String countHql="select count(*) from Checking check where 1=1 ";
		Map<String, Object> map = new HashMap<String, Object>();
		if(id!=0){
			 hql+="and employee_id=:id"; 
			 countHql+="and employee_id=:id";
			 map.put("id",id);
		}
		return checkDao.findPageByHql(page.getPageNo(),page.getPageSize(),hql, countHql, map);
	}
	
	public IBaseDao getCheckDao() {
		return checkDao;
	}
	public void setCheckDao(IBaseDao checkDao) {
		this.checkDao = checkDao;
	}

	public void save(Checking check) {
		// TODO Auto-generated method stub
		
	}

}
